{
    "status" : <?php if($status) { ?>true,
    "single" :
    [
    <?php $i = 0; foreach($single as $u) { ?>
        { "pseudo" : "<?php echo $u["pseudo"]; ?>", "hash" : "<?php echo $u["hash"]; ?>", "self": <?php if($u["hash"] == $this->session->userdata('session_id')){echo "true";} else { echo "false";} ?>  }
        <?php $i++; if($i != count($single)){echo ","; } } ?>
    ],
    "multi" :
    [
    <?php $i=0; foreach($multi as $key => $u) { if($u[0]["room"] == $u[1]){$pos = 2;} else {$pos = 1;} $u = $u[0];  ?>
        { "pseudo": "<?php echo $u["pseudo"]; ?>", "hash" : "<?php echo $u["hash"]; ?>", "room": <?php echo $u["room"]; ?>, "position" : <?php echo $pos; ?> }
    <?php $i++; if($i != count($multi)){echo ","; } } ?>
    ]
    <?php } else { ?>false<?php } ?>
}